import requestInstance from '/utils/http.js'


/**
 * @description 新增收货地址
 * @param {*} data
 * @returns {Promise}
 */
export const reqAddAddress = (data)=>{
	return requestInstance.post('/userAddress/save',data)
}
/**
 * @description 获取收货地址列表
 * @returns {Promise}
 */
export const reqAddressList = ()=>{
	return requestInstance.get('/userAddress/findUserAddress')
}
/**
 * @description 获取收货地址详情
 * @param {Sting} id
 * @returns {Promise}
 */
export const reqAddressInfo = (id)=>{
	return requestInstance.get(`/userAddress/${id}`)
}
/**
 * @description 更新收货地址
 * @param {*} data
 * @returns {Promise}
 */
export const reqUpdateAddress = (data)=>{
	return requestInstance.post('/userAddress/update',data)
}
/**
 * @description 删除收货地址
 * @param {Sting} id
 * @returns  {Promise}
 */
export const reqDeleteAddress = (id) =>{
	return requestInstance.get(`/userAddress/delete/${id}`)
}